package com.rr.learningdemo.newfeature;

/**
 * @author RR
 * @date 2021/3/16 16:24
 */
//lambda使我们声明匿名函数更方便简洁
public class LambdaDemo {
    interface AddInterface{
        int addOpt(int a, int b);
    }

    public static void main(String[] args) {
        AddInterface addInterface = (a, b) -> a + b;
        int i = addInterface.addOpt(1, 2);
        System.out.println(i);
    }
}
